<template>
  <!-- hvps115明细-->
  <el-dialog :title="title" center :visible.sync="openState" width="1024px" :close-on-click-modal="false">
    <el-form ref="queryDetailForm118" :model="form" label-width="110px" :disabled="true">
      <!--交易础信息-->
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>交易基础信息</span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="交易流水号" prop="id">
              <el-input v-model="form.id" />
            </el-form-item>
          </el-col>

            <el-col :span="8">
              <el-form-item label="业务类型" prop="bizTypeCode">
                <el-select v-model="form.bizTypeCode" placeholder="业务类型">
                  <el-option
                    v-for="dict in dictMap.BIZ_TYPE_116"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="业务种类" prop="bizCtgyCode">
                <el-select v-model="form.bizCtgyCode" placeholder="业务种类">
                  <el-option
                    v-for="dict in dictMap.BIZ_CTGY_116"
                    :key="dict.value"
                    :label="`${dict.value}-${dict.text}`"
                    :value="dict.value"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="记账标志" prop="cbflag">
              <el-select v-model="form.cbflag" placeholder="记账标志">
                <el-option
                  v-for="dict in dictMap.CBFLAG"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="工作日期" prop="workdate">
              <!-- <el-input v-model="form.workdate" /> -->
              <el-date-picker
                v-model="form.workdate"
                type="date"
                value-format="yyyyMMdd"
                placeholder=""
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="来往账方向" prop="drct">
              <el-select v-model="form.drct" placeholder="来往账方向">
                <el-option
                  v-for="dict in dictMap.DRCTCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="8">
            <el-form-item label="交易币种" prop="curcd">
              <el-input v-model="form.curcd" placeholder="人民币-CNY" :disabled="true" style="width: 195px" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="退回金额" prop="amount">
              <ht-amount-input v-model="form.amount" placeholder="退回金额" style="width: 195px"></ht-amount-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="大写金额" prop="bAmount">
              <ht-amount-upper :inputValue="form.amount" placeholder="退回金额" style="width: 195px"></ht-amount-upper>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="附言" prop="remarks" >
            <el-input
              type="textarea"
              v-model="form.remarks"
              placeholder="附言"
            />
          </el-form-item>
        </el-row>
      </el-card>

      <!--发起机构信息-->
      <el-card class="form-card payerInfo-card">
        <div slot="header" class="label-header-msg">
          <span>发起接收机构信息</span>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payer">
              <el-form-item label="发起参与机构号" prop="indirectSender">
                <el-input v-model="form.indirectSender" placeholder="发起参与机构号" />
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="16">
            <el-form-item label="发起参与机构行名" prop="indirectSenderName" label-width="150px">
              <el-input v-model="form.indirectSenderName" placeholder="发起参与机构行名" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payer">
              <el-form-item label="发起直接参与机构" prop="directSender">
                <el-input v-model="form.directSender" placeholder="发起直接参与机构" />
              </el-form-item>
            </div>
          </el-col>

          <el-col :span="16">
            <el-form-item label="发起直接参与机构行名 " prop="directSenderName" label-width="150px">
              <el-input v-model="form.directSenderName" placeholder="发起直接参与机构行名 " />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payee">
              <el-form-item label="接收参与机构号" prop="indirectRecver">
                <el-input v-model="form.indirectRecver" placeholder="接收参与机构号" />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="16">
            <el-form-item label="接收参与机构行名" prop="indirectRecverName" label-width="150px">
              <el-input v-model="form.indirectRecverName" placeholder="接收参与机构行名" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payee">
              <el-form-item label="接收直接参与机构" prop="directRecver">
                <el-input v-model="form.directRecver" placeholder="接收直接参与机构" />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="16">
            <el-form-item label="接受直接参与机构行名" prop="directRecverName" label-width="150px">
              <el-input v-model="form.directRecverName" placeholder="接受直接参与机构行名" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-otherInfo">
              <el-form-item label="退回金额" prop="amount">
                <el-input v-model="form.amount" placeholder="退回金额" />
              </el-form-item>
            </div>
          </el-col>
        </el-row>
      </el-card>
      <query-detail-inter-info
        ref="detailInterInfo"
        :dataDetail="this.form"
        :dictMap="dictMap"
      ></query-detail-inter-info>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleClose">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { detail } from "@/api/cnaps/baseBiz/send/sendCommon.js";
import HtAmountInput from "@/views/components/HtAmountInput";
import HtAmountUpper from "@/views/components/HtAmountUpper";
import QueryDetailInterInfo from "@/views/cnaps/baseBiz/send/components/queryDetailInterInfo";

export default {
  name: "QueryDetailDialog",
  components: {
    HtAmountInput,
    HtAmountUpper,
    QueryDetailInterInfo,
  },
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      busTypeList: [],
      id: "",
      pkgNo: "",
      title: "",
      // 是否显示弹出层
      openState: false,

      // 字段可编辑控制

      // 表单参数
      form: {
        amount: "0.00",
      },
    };
  },
  mounted() {},
  methods: {
    // 关闭回掉
    handleClose() {
      this.openState = false;
    },

    show(id, pkgNo) {
      this.openState = true;
      if (id) {
        this.title = "大额延迟结算退回申请明细";
        detail({
          coreId: id,
          pkgNo: pkgNo,
        }).then((res) => {
          this.$set(this, "form", res.result.detail90118DataModel);
        });
      }
    },

    cancel() {
      this.openState = false;
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
